VERSION 5.00
Begin VB.Form frmPriceList 
   Caption         =   "רשימת מחירונים"
   ClientHeight    =   6075
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   8595
   LinkTopic       =   "Form1"
   ScaleHeight     =   6075
   ScaleWidth      =   8595
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtList 
      Height          =   5055
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   480
      Width           =   8535
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "סגור"
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   5640
      Width           =   855
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "טופס רשימת מחירונים"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   177
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6120
      TabIndex        =   2
      Top             =   0
      Width           =   2415
   End
End
Attribute VB_Name = "frmPriceList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const MOD_NAME = "frmCustomerList."

Private Sub cmdClose_Click()
10        Unload Me
End Sub

Private Sub Form_Load()
      Const FUNC_NAME = MOD_NAME & "Form_Load"
10    On Error GoTo func_err
          
20        Call PopulatePriceList
30    Exit Sub

func_err:
50        MyErrMsgBox "Error " & Err.Number & " in " & FUNC_NAME & "[" & Erl & "]" & "\" & Err.Source & ": " & Err.Description
End Sub


Sub PopulatePriceList()
      Const FUNC_NAME = MOD_NAME & "PopulatePriceList"
10    On Error GoTo func_err
        Dim V1
        Dim objCaspit As CaspitAPI.Caspit
        Dim objPriceList As CaspitAPI.PriceList
        Dim I As Long
          
20        Set objCaspit = New CaspitAPI.Caspit
          
30        With objCaspit
40            .CaspitPath = g_strCaspitPath
50            .AccessPath = g_strAccessPath
60            .BusinessID = g_iBusinessID
70            .DebugMode = g_blnDebug
80        End With
        
90        V1 = objCaspit.GetPriceLists()
          
100       txtList.Text = "iListsID - iListNumber - Profit Percent" & vbCrLf
110       For I = 0 To UBound(V1)
120             Set objPriceList = V1(I)
130             txtList.Text = txtList.Text & objPriceList.ListID & "-" & Abs(objPriceList.ListNum Mod 10000) & " - " & objPriceList.ProfitPercent & vbCrLf
140       Next
          
150       Set objCaspit = Nothing
160   Exit Sub

func_err:
170       Set objCaspit = Nothing
180       Err.Raise Err.Number, FUNC_NAME & "[" & Erl & "]" & "\" & Err.Source, Err.Description
End Sub

